package com.woniuxy.cloud.carl.store.client;


import com.woniuxy.cloud.carl.store.client.param.*;
import com.woniuxy.cloud.carl.store.client.result.StoreDto;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Lucas
 * @since 2023-07-19
 */
@FeignClient(name = "store",contextId = "storeClient")
public interface StoreClient {
    @PostMapping("/addStore")
    Result addStore(@RequestBody AddStoreParam param);
    @PutMapping("/modifyStore")
    Result modifyStore(@RequestBody ModifyStoreParam param);
    @PutMapping("/modifyStorePassword")
    Result modifyStorePassword(@RequestBody ModifyStorePasswordParam param);
    @PutMapping("/modifyStoreState")
    Result modifyStoreState(@RequestBody ModifyStoreStateParam param);
    @GetMapping("/getStore")
    Result<List<StoreDto>> getStore(@SpringQueryMap GetStoreParam param);
    @PostMapping("/storeLogin")
    Result<String> storeLogin(@RequestBody StoreLoginParam param);

    @GetMapping("/synchronizingStoreScore")
    void synchronizingStoreScore();

    @PostMapping("/addServiceInStore")
    Result modifyServiceInStore(@RequestBody AddServiceInStoreParam param);
    @GetMapping("/getServiceByStoreId")
    Result<List<Long>> getServiceByStoreId(@RequestParam("storeId")Long storeId);
}

